package com.smedi.ismedi.inmail.api.dto.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.smedi.ismedi.authority.starter.request.ValidGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author u
 */
@Data
public class MessageInfoRequest implements Serializable {
    @ApiModelProperty(value = "消息ID")
    @Null(message = "新增消息Id应为空", groups = ValidGroup.Add.class)
    @NotNull(message = "编辑消息ID不能为空", groups = ValidGroup.Edit.class)
    private Long id;

    @ApiModelProperty(value = "项目Id")
    private String projectId;

    @ApiModelProperty(value = "项目名称")
    private String projectName;

    @ApiModelProperty(value = "消息来源")
    private String sourceFrom;

    @ApiModelProperty(value = "消息来源ID")
    private Long sourceFromId;

    @NotBlank(message = "消息标题不能为空", groups = {ValidGroup.Add.class, ValidGroup.Edit.class})
    @ApiModelProperty(value = "消息标题")
    private String messageTitle;

    @ApiModelProperty(value = "消息内容")
    private String messageContent;

    @NotNull(message = "消息类型不能为空", groups = {ValidGroup.Add.class, ValidGroup.Edit.class})
    @ApiModelProperty(value = "消息类型")
    private String messageType;

    @ApiModelProperty(value = "消息推送时间")
    private LocalDateTime pushTime;
}